<div id="uploadform" style="width: 300px; height: 100px; position: fixed; top: 50%; margin-top: -50px; margin-left: auto; margin-right: auto; background-color: #fff; text-align: right; border: 1px solid black; display: none;">
	<a onclick="document.getElementById('uploadform').style.display = 'none'">X</a>
	<iframe style="width: 100%; height: 80px; border: none;" src="php/upload.php?field=image_url&id=series_(:series_id:)_mediaobject_(:object_id:)"></iframe>
</div>

<h1 class="name">(:series_name:) – (:title:)</h1>

<!--<table style="margin: 20px 0px 0px 35px; padding-bottom: 20px; border-bottom: 1px solid grey;">
    <tr>
        <td>
            Related Mediaobjects:
        </td>
        <td />
    </tr>
    <tr>
        <td rowspan="2">
            <select id="related_object_select" size="4" style="width:400px;" 
                onclick="mediaobjecteditor.load($('related_object_select').value)" 
                style="border: 1px solid grey;">
                    
            </select>
        </td>
        <td>
          <div onclick="mediaobjecteditor.load($('related_object_select').value);" class="button2">edit</div>
          <div>(:related_objects:)</div>  
            <!--
            <button type="button" 
                onclick="mediaobjecteditor.add(array('cou_id' => (:cou_id:)));" 
                style="width:80px">Neu</button><br />
            <button type="button" 
                onclick="mediaobjecteditor.remove(document.getElementById('related_object_select').value)" 
                style="width:80px">L&ouml;schen</button>
            
        </td>
    </tr>    
    <tr>  
      <td>
        <div onclick="$('object_id').value = '';" class="button2">duplicate</div>
      </td>
    </tr>    
</table>      -->


<div id="tabmenu">
  <div>(:related_objects:)</div>
</div>


<form name="fields" id="fields" action="#">
<table style="margin-left: 35px; margin-top: 35px;">

    <tr>
        <td class="right">Object-ID:</td>
        <td>
            <input type="text" 
                class="readonly w400" 
                id="object_id" 
                name="object_id" 
                value="(:object_id:)" 
                readonly="true" />
        </td>
    </tr>

    <tr>
        <td class="right">Title:</td>
        <td>
            <input type="text" 
                class="w400" 
                id="title" 
                name="title" 
                value="(:title:)" 
                onkeypress="$('savebutton').disabled = false;" />
        </td>
    </tr>

    <tr>
        <td class="right">Description:</td>
        <td>
            <textarea 
                class="w400" 
                rows="3"
                id="description" 
                name="description" 
                onkeypress="$('savebutton').disabled = false;" 
                style="width:400px; max-width:400px; min-width:400px;">(:description:)</textarea>
        </td>
    </tr>

    <tr>
        <td class="right"> COU-ID:</td>
        <td>
            <input type="text" 
                class="w400" 
                id="cou_id" 
                name="cou_id" 
                value="(:cou_id:)" 
                onkeypress="$('savebutton').disabled = false;" />
        </td>
    </tr>

    <tr>
        <td class="right">Series:</td>
        <td>
            <select type="text" 
                class="w400" 
                id="series_id" 
                name="series_id" 
                onkeypress="$('savebutton').disabled = false;"
                style="width:406px;" >
                    (:series_options:)
            </select>
        </td>
        <td><a href="javascript:load_editor_as_dialog('series');" class="editbutton">Edit</a></td>
    </tr>

	 <!--
    <tr>
      <td>Test</td>
      <td>
	<form id="fx" method="post" action="#">
	<input type="text" id="date" name="date" class="date" />
	
	<script type="text/javascript">
		/*<[CDATA[*/
		var datepicker	= new DatePicker({
		relative	: 'date',
		language	: 'de'
		});
		/*]]>*/
	</script>
	
	</form>
	
      </td>
	</tr>
	-->
    
    <tr>
        <td class="right">Aufzeichnungsdatum:</td>
        <td>
            <select name="day" id="day" onchange="$('savebutton').disabled=false;">(:day_options:)</select>.
            <select name="month" id="month" onchange="$('savebutton').disabled=false;">(:month_options:)</select>.
            <select name="year" id="year" onchange="$('savebutton').disabled=false;">(:year_options:)</select>
        </td>
    </tr>

    <tr>
        <td class="right">Uhrzeit:</td>
        <td>
            <select name="hour" id="hour" onchange="$('savebutton').disabled=false;">(:hour_options:)</select>:
            <select name="minute" id="minute" onchange="$('savebutton').disabled=false;">(:minute_options:)</select>:
            <select name="second" id="second" onchange="$('savebutton').disabled=false;">(:second_options:)</select>
        </td>
    </tr>

    <tr>
        <td class="right"> LRS-Object-ID:</td>
        <td>
            <input type="text" 
                class="w400" 
                id="lrs_object_id" 
                name="lrs_object_id" 
                value="(:lrs_object_id:)" 
                onkeypress="$('savebutton').disabled = false;" />
        </td>
    </tr>

    <tr>
        <td class="right">Sprache:</td>
        <td>
            <select id="language_id" 
                name="language_id" 
                class="w400" 
                onchange="$('savebutton').disabled = false;"
                style="width:406px;">
                    (:language_options:)
            </select>
        </td>
        <td class="left">
          <a href="javascript:load_editor_as_dialog('language');" class="editbutton">Edit</a>
        </td>    
    </tr>

    <tr>
        <td class="right">Format:</td>
        <td>
            <select id="format_id" 
                name="format_id" 
                class="w400" 
                onchange="$('savebutton').disabled = false;"
                style="width:406px;">
                    (:format_options:)
            </select>
        </td>
        <td class="left">
          <a href="javascript:load_editor_as_dialog('format');" class="editbutton">Edit</a>
        </td>   
    </tr>

    <tr>
        <td class="right">Access:</td>
        <td>
            <select id="access_id" 
                name="access_id" 
                class="w400" 
                onchange="$('savebutton').disabled = false;"
                style="width:406px;">
                    (:access_options:)
            </select>
        </td>
        <td class="left">
          <a href="javascript:load_editor_as_dialog('access');" class="editbutton">Edit</a>
        </td>    
    </tr>

    <tr>
        <td class="right">URL:</td>
        <td>
            <input type="text" 
                class="w400" 
                id="url" 
                name="url" 
                value="(:url:)" 
                onkeypress="$('savebutton').disabled = false;" />
        </td>
        <td>
          <a class="editbutton" target="_blank" href="(:url:)">Prev</a>
        </td>
    </tr>

    <tr>
        <td class="right">Memory-size:</td>
        <td>
            <input type="text" 
                class="w400" 
                id="memory_size" 
                name="memory_size" 
                value="(:memory_size:)" 
                onkeypress="$('savebutton').disabled = false;" />
        </td>
    </tr>

    <tr>
        <td class="right">Author:</td>
        <td>
            <input 
                type="text"
                class="w400" 
                id="author" 
                name="author" 
                value="(:author:)" 
                onkeypress="$('savebutton').disabled = false;" />
        </td>
    </tr>

    <tr>
        <td class="right">Preview-URL:</td>
        <td>
            <input type="text" 
                class="w400"
                id="preview_url" 
                name="preview_url" 
                value="(:preview_url:)" 
                onkeypress="$('savebutton').disabled = false;" />
        </td>
    </tr>

    <tr>
        <td class="right">Image-URL:</td>
        <td>
            <input type="text" 
                class="w300"
                id="image_url" 
                name="image_url" 
                value="(:image_url:)" 
                onkeypress="$('savebutton').disabled = false;" 
                style="width:295px;" />
				<button id="imguploadbtn" type="button" class="w100" 
					onclick="document.getElementById('uploadform').style.display = 'block';">upload file</button>
        </td>
        <td>
          <a href="#" class="editbutton" onclick="$('showimg').style.display = ( $('showimg').style.display == 'none')?'block':'none' ;">Prev</a>
        </td>
    </tr>
    
    <tr>
      <td></td>
      <td id="showimg" style="display:none;">
        <img src="(:image_url:)" style="max-width: 400px;" alt="" />
      </td>
    </tr>

    <tr>
        <td class="right">Thumbnail-URL:</td>
        <td>
            <input type="text" 
                class="w400"
                id="thumbnail_url" 
                name="thumbnail_url" 
                value="(:thumbnail_url:)" 
                onkeypress="$('savebutton').disabled = false;" />
        </td>
        <td>
          <a href="#" class="editbutton" onclick="$('showthumb').style.display = ( $('showthumb').style.display == 'none')?'block':'none' ;">Prev</a>
        </td>
    </tr> 
    
    <tr>
      <td></td>
      <td id="showthumb" style="display:none;">
			<img src="(:thumbnail_url:)" style="max-width: 400px;" alt="" />
      </td>
    </tr>

    <tr>
        <td class="right">Spielzeit:</td>
        <td>
            <input type="text" 
                class="w400"
                id="duration" 
                name="duration" 
                value="(:duration:)" 
                onkeypress="$('savebutton').disabled = false;" />
        </td>
    </tr>

    <tr>
        <td class="right"> Location:</td>
        <td>
            <input type="text" 
                class="w400" 
                id="location"
                name="location" 
                value="(:location:)" 
                onkeypress="$('savebutton').disabled = false;" />
        </td>
    </tr>

    <tr>
        <td class="right">Additional URL:</td>
        <td>
            <input type="text" 
                class="w400" 
                id="add_url"
                name="add_url" 
                value="(:add_url:)" 
                onkeypress="$('savebutton').disabled = false;" />
        </td>
    </tr>

    <tr>
        <td class="right">Additional-URL-text:</td>
        <td>
            <input type="text" 
                class="w400" 
                id="add_url_text"
                name="add_url_text" 
                value="(:add_url_text:)" 
                onkeypress="$('savebutton').disabled = false;" />
        </td>
    </tr>

    <tr>
        <td></td>
        <td style="text-align: center; padding-top: 15px;">
            <input type="hidden" 
                id="old_series_id" 
                name="old_series_id"
                value="(:series_id:)" />
            <input type="button" id="savebutton" disabled="disabled" 
                onclick="mediaobjecteditor.save()" value="save" />
        </td>
    </tr>
    
    <tr>
        <td />
        <td style="text-align: center; padding-bottom: 15px;" id="mediaobject_response" />
    </tr>

    <tr>
        <td />
        <td style="text-align: center; padding-top: 15px; border-top: 1px solid grey;">
            <input type="button" class="button2" id="deletebutton"
                onclick="mediaobjecteditor.remove((:object_id:), (:series_id:))" value="delete" />
        </td>
    </tr>  
</table>
</form>


